package com.irdstudio.efp.cus.api.rest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.irdstudio.efp.cus.service.facade.CusPrelistRiskInfoService;
import com.irdstudio.efp.cus.service.vo.CusPrelistRiskInfoVO;
import com.irdstudio.basic.framework.core.constant.ResponseData;
import com.irdstudio.basic.framework.web.controller.AbstractController;

@RestController
@RequestMapping("/api")
public class CusPrelistRiskInfoController extends AbstractController  {
	
	@Autowired
	@Qualifier("cusPrelistRiskInfoService")
	private CusPrelistRiskInfoService cusPrelistRiskInfoService;
	
	
	/**
	 * 根据预授信流水号查询详情
	 * @return
	 */
	@RequestMapping(value="/cus/cusprelistriskinfo/{preSerno}", method=RequestMethod.GET)
	public @ResponseBody ResponseData<CusPrelistRiskInfoVO> queryByPk(@PathVariable("preSerno") String preSerno) {		
		CusPrelistRiskInfoVO inVo = new CusPrelistRiskInfoVO();
		inVo.setPreSerno(preSerno);
		CusPrelistRiskInfoVO outputVo = cusPrelistRiskInfoService.queryByCondition(inVo);
		return getResponseData(outputVo);
	}
	
	
}
